package spec.zhangyuehua.$03.$0302;

import spec.zhangyuehua.$03.$0301.FinanceInfo;

import java.util.Scanner;

/**
 * Created by yue on 2017/9/21.
 */
public class FinanceInfo1 {
    private static String companyName;
    private static double earnestIncome;
    private static double depositIncome;
    private static double rentIncome;
    private static double otherIncome;
    private static double staffCost;
    private static double rentCost;
    private static double hydropowerCost;
    private static double taxCost;
    private static double otherCost;
    public static void init(){
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入公司名称：");
        companyName=sc.next();
        System.out.println("请输入定金收入：");
        earnestIncome=sc.nextDouble();
        System.out.println("请输入押金收入：");
        depositIncome=sc.nextDouble();
        System.out.println("请输入租金收入：");
        rentIncome=sc.nextDouble();
        System.out.println("请输入其他收入：");
        otherIncome=sc.nextDouble();
        System.out.println("请输入员工成本：");
        staffCost=sc.nextDouble();
        System.out.println("请输入店面房租：");
        rentCost=sc.nextDouble();
        System.out.println("请输入水电成本：");
        hydropowerCost=sc.nextDouble();
        System.out.println("请输入税收费用：");
        taxCost=sc.nextDouble();
        System.out.println("请输入其他费用：");
        otherCost=sc.nextDouble();
    }
    public static double calIncome(){
        double sum=earnestIncome+depositIncome+rentIncome+otherIncome;
        return sum;
    }
    public static double calCost(){
        double sum=staffCost+rentCost+hydropowerCost+taxCost+otherCost;
        return sum;
    }
    public static double calNetIncome(){
        System.out.println(companyName+"的净收入计算结果：");
        double netIncome=calIncome()-calCost();
        return  netIncome;
    }
}
